package com.chenjun.common.crypto;

public class HashEncryptionFactory {
	private HashEncryptionFactory() {
	}

	public static IHashEncryption getEncryption(HashEncryptionType type) {
		IHashEncryption encryption = null;
		switch (type) {
		case SHA1:
			encryption = new SHA1Encryption();
			break;
		case SHA256:
			encryption = new SHA256Encryption();
			break;
		case MD2:
			encryption = new MD2Encryption();
			break;
		case MD5:
			encryption = new MD5Encryption();
			break;
		default:
			break;
		}
		return encryption;
	}
}
